package com.firefly.dao.dto.mc;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.PositiveOrZero;
import java.io.Serializable;

/**
 * @description:
 * @author: lzg(萤火科技 ： 854378082 @ qq.com)
 * @date: 2023/1/31
 **/
@Data
@EqualsAndHashCode(callSuper = false)
public class McMenuDto implements Serializable {
    private static final long serialVersionUID = 1L;
    @Positive(groups = {update.class},message = "ID是大于0的整数")
    private Integer id;

    @PositiveOrZero(groups = {create.class},message = "父级分类输入大于0的整数")
    @NotNull(groups = {create.class, update.class},message = "父级必填")
    private Integer parentId;

    @NotBlank(groups = {create.class, update.class},message = "名称必填")
    private String name;

    @NotBlank(groups = {create.class, update.class},message = "URL必填")
    private String url;
    // 分组校验
    public interface create {}
    public interface update {}
}
